{% extends "admin/change_list.html" %}
{% load i18n %}
{% load menu_tags %}
{% block object-tools %}
  {% if has_add_permission %}
    <ul class="object-tools">
      {% for id, name in menu_option_types %}
      <li>
        <a href="add/{{ id }}/{% if is_popup %}?_popup=1{% endif %}" class="addlink">
          {% blocktrans with name as name %}Add {{ name }}{% endblocktrans %}
        </a>
      </li>
      {% endfor %}
    </ul>
  {% endif %}
{% endblock %}
{% block pagination %}
{{ block.super }}
  <h4>Hierarchy View (filters do not apply to this section)</h4>
  {% for group in menu_groups %}
    <table summary="Menu options available in the {{ group.name }} menu group.">
    <caption>{{ group.as_admin_link|safe }}</caption>
      <thead>
        <tr>
          <th>&#160;</th>
          <th>Option type</th>
          <th>Show to Anonymous</th>
          <th>Show to Authenticated</th>
          <th>Show to Staff</th>
        </tr>
      </thead>
      <tbody>
      {% admin_menu_as_tag group %}
      </tbody>
    </table>
    {% if not forloop.last %}
      <br />
    {% endif %}
  {% endfor %}
{% endblock %}
